package com.osdp.sc.api.impl;

import com.osdp.sc.api.IRoleApi;
import com.osdp.sc.dto.RoleDTO;
import com.osdp.sc.service.IScRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleApiImpl implements IRoleApi {

    @Autowired
    private IScRoleService scRoleService;

    @Override
    public List<RoleDTO> getRolesByUserId(String userId) {
        return scRoleService.getRolesByUserId(userId);
    }

    @Override
    public List<String> getRoleCodeByUserId(String userId) {
        return scRoleService.getRoleCodeByUserId(userId);
    }
}
